'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 远征士兵血量信息
 * @author agl
 */

var mongoose = require('mongoose');

///////////////////////////////////////////////////////////
/**
 * 远征已方士兵血量信息
 * @type {mongoose}
 */
var soldierHpItemSchema = new mongoose.Schema({
    // 士兵类型
    soldier_type: {
        type: Number,
        required: true
    },

    // 最大血量
    max_hp: {
        type: Number,
        required: true
    },

    // 当前血量
    curr_hp: {
        type: Number,
        required: true
    }
});

if (!soldierHpItemSchema.options.toJSON) {
    soldierHpItemSchema.options.toJSON = {};
}
/* jshint unused:false */
soldierHpItemSchema.options.toJSON.transform = function (doc, ret) {
    delete ret._id;
    delete ret.__v;
};

module.exports = soldierHpItemSchema;
